package com.yantong.mapper;

import com.yantong.pojo.AchieveConfig;
import com.yantong.pojo.AchieveConfigExample;
import com.yantong.pojo.AchieveConfig;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface AchieveConfigMapper {
    int countByExample(AchieveConfigExample example);

    int deleteByExample(AchieveConfigExample example);

    int deleteByPrimaryKey(Long id);

    int insert(AchieveConfigMapper record);

    int insertSelective(AchieveConfig record);

    List<AchieveConfig> selectByExample(AchieveConfigExample example, RowBounds rowBounds);

    AchieveConfig selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") AchieveConfig record, @Param("example") AchieveConfigExample example);

    int updateByExample(@Param("record") AchieveConfig record, @Param("example") AchieveConfigExample example);

    int updateByPrimaryKeySelective(AchieveConfig record);

    int updateByPrimaryKey(AchieveConfig record);

    /**
     * 获取最小单数
     * @param centreId
     * @return
     */
    Integer getMinimal(Long centreId);

    /**
     * 通过订单数获取配置级别信息
     * @param centreId
     * @param num
     * @return
     */
    AchieveConfig getByOrderNum(@Param("centreId") Long centreId, @Param("num") Integer num);
}